Fix 2 issues when creating HVM guests:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 10 Aug 2006 09:37:15 +0000 (10:37 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 10 Aug 2006 09:37:15 +0000 (10:37 +0100)
 1) xend can't start due to xend-config.sxp
 2) qemu dm option vncunused should be effective only
    when vnc is turned on.

Signed-off-by: Xin Li <xin.b.li@intel.com>
tools/examples/xend-config.sxp
tools/python/xen/xend/image.py

index b11a80fc1b518a14179a923c01c35bbfc4cf0d7c..9d1be3fb56d68ac7b664f4fc948f66022b37c288 100644 (file)
@@ -54,7 +54,7 @@
 #  (xend-relocation-hosts-allow '^localhost$ ^.*\.example\.org$')
 #
 #(xend-relocation-hosts-allow '')
-(xend-relocation-hosts-allow '^localhost$ ^localhost\.localdomain$')
+(xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$')
 
 # The limit (in kilobytes) on the size of the console buffer
 #(console-limit 1024)
index 93f1c9f810dfc59ce38b572f08353ef5b35af1df..64fb8109442b0f00b86577859320c9d73c21987d 100644 (file)
@@ -251,7 +251,7 @@ class HVMImageHandler(ImageHandler):
     def parseDeviceModelArgs(self, imageConfig, deviceConfig):
         dmargs = [ 'boot', 'fda', 'fdb', 'soundhw',
                    'localtime', 'serial', 'stdvga', 'isa', 'vcpus',
-                  'acpi', 'usb', 'usbdevice']
+                   'acpi', 'usb', 'usbdevice']
         ret = []
         for a in dmargs:
             v = sxp.child_value(imageConfig, a)
@@ -305,9 +305,6 @@ class HVMImageHandler(ImageHandler):
     def configVNC(self, config):
         # Handle graphics library related options
         vnc = sxp.child_value(config, 'vnc')
-        vncdisplay = sxp.child_value(config, 'vncdisplay',
-                                     int(self.vm.getDomid()))
-        vncunused = sxp.child_value(config, 'vncunused')
         sdl = sxp.child_value(config, 'sdl')
         ret = []
         nographic = sxp.child_value(config, 'nographic')
@@ -315,9 +312,12 @@ class HVMImageHandler(ImageHandler):
             ret.append('-nographic')
             return ret
         if vnc:
+            vncdisplay = sxp.child_value(config, 'vncdisplay',
+                                         int(self.vm.getDomid()))
             ret = ret + ['-vnc', '%d' % vncdisplay, '-k', 'en-us']
-        if vncunused:
-            ret += ['-vncunused']
+            vncunused = sxp.child_value(config, 'vncunused')
+            if vncunused:
+                ret += ['-vncunused']
         return ret
 
     def createDeviceModel(self):